<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>C++的基于对象编程范式、常用STL容器和C++11标准 | 夜悊的技术小宅</title><meta name="author" content="夜悊"><meta name="copyright" content="夜悊"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="前言C++的基于对象编程范式、常用STL容器和C++11标准。  基于对象编程范式面向过程编程范式的例子12345678910111213141516#include &lt;iostream&gt;using std::cout;using std::endl;int main()&#123;    int num1 &#x3D; 1;    int num2 &#x3D; 2;        int sum &#x3D;">
<meta property="og:type" content="article">
<meta property="og:title" content="C++的基于对象编程范式、常用STL容器和C++11标准">
<meta property="og:url" content="http://example.com/2022/12/23/C++%E7%9A%84%E5%9F%BA%E4%BA%8E%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B%E8%8C%83%E5%BC%8F%E3%80%81%E5%B8%B8%E7%94%A8STL%E5%AE%B9%E5%99%A8%E5%92%8CC++11%E6%A0%87%E5%87%86/index.html">
<meta property="og:site_name" content="夜悊的技术小宅">
<meta property="og:description" content="前言C++的基于对象编程范式、常用STL容器和C++11标准。  基于对象编程范式面向过程编程范式的例子12345678910111213141516#include &lt;iostream&gt;using std::cout;using std::endl;int main()&#123;    int num1 &#x3D; 1;    int num2 &#x3D; 2;        int sum &#x3D;">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/img/cover20.png">
<meta property="article:published_time" content="2022-12-23T10:24:31.000Z">
<meta property="article:modified_time" content="2023-04-13T04:53:20.775Z">
<meta property="article:author" content="夜悊">
<meta property="article:tag" content="C++">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/img/cover20.png"><link rel="shortcut icon" href="/img/favicon2.png"><link rel="canonical" href="http://example.com/2022/12/23/C++%E7%9A%84%E5%9F%BA%E4%BA%8E%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B%E8%8C%83%E5%BC%8F%E3%80%81%E5%B8%B8%E7%94%A8STL%E5%AE%B9%E5%99%A8%E5%92%8CC++11%E6%A0%87%E5%87%86/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css?v=4.13.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":50,"languages":{"author":"作者: 夜悊","link":"链接: ","source":"来源: 夜悊的技术小宅","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid@4.11.1/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'C++的基于对象编程范式、常用STL容器和C++11标准',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-04-13 12:53:20'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><link rel="stylesheet" href="/css/my_css.css"><meta name="generator" content="Hexo 7.3.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="/img/avatar.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">92</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">15</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">15</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-bookmark"></i><span> 笔记目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-blog"></i><span> 其他博客</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.csdn.net/m0_62083249"><i class="fa-fw fa fa-link"></i><span> CSDN</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.zhihu.com/people/ye-zhe-ning"><i class="fa-fw fa fa-link"></i><span> 知乎</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-sitemap"></i><span> 代码仓库</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gitee.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Gitee</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://github.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Github</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about_me/"><i class="fa-fw fas fa-user"></i><span> 关于我</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/img/cover20.png')"><nav id="nav"><span id="blog-info"><a href="/" title="夜悊的技术小宅"><span class="site-name">夜悊的技术小宅</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-bookmark"></i><span> 笔记目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-blog"></i><span> 其他博客</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.csdn.net/m0_62083249"><i class="fa-fw fa fa-link"></i><span> CSDN</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.zhihu.com/people/ye-zhe-ning"><i class="fa-fw fa fa-link"></i><span> 知乎</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-sitemap"></i><span> 代码仓库</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gitee.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Gitee</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://github.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Github</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about_me/"><i class="fa-fw fas fa-user"></i><span> 关于我</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">C++的基于对象编程范式、常用STL容器和C++11标准</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-12-23T10:24:31.000Z" title="发表于 2022-12-23 18:24:31">2022-12-23</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-04-13T04:53:20.775Z" title="更新于 2023-04-13 12:53:20">2023-04-13</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/C/">C++</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="C++的基于对象编程范式、常用STL容器和C++11标准"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>C++的基于对象编程范式、常用STL容器和C++11标准。</p>
<hr>
<h1 id="基于对象编程范式"><a href="#基于对象编程范式" class="headerlink" title="基于对象编程范式"></a>基于对象编程范式</h1><h2 id="面向过程编程范式的例子"><a href="#面向过程编程范式的例子" class="headerlink" title="面向过程编程范式的例子"></a>面向过程编程范式的例子</h2><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;iostream&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="keyword">using</span> std::cout;</span><br><span class="line"><span class="keyword">using</span> std::endl;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="type">int</span> <span class="title">main</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">    <span class="type">int</span> num1 = <span class="number">1</span>;</span><br><span class="line">    <span class="type">int</span> num2 = <span class="number">2</span>;</span><br><span class="line">    </span><br><span class="line">    <span class="type">int</span> sum = num1 + num2;</span><br><span class="line"></span><br><span class="line">    cout &lt;&lt; sum &lt;&lt; endl;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<hr>
<h2 id="基于对象编程范式的例子"><a href="#基于对象编程范式的例子" class="headerlink" title="基于对象编程范式的例子"></a>基于对象编程范式的例子</h2><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;iostream&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="keyword">using</span> std::cout;</span><br><span class="line"><span class="keyword">using</span> std::endl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">GetSum</span></span><br><span class="line">&#123;</span><br><span class="line"><span class="keyword">public</span>:</span><br><span class="line">    <span class="function"><span class="type">int</span> <span class="title">calculation</span><span class="params">(<span class="type">const</span> <span class="type">int</span> &amp;num1, <span class="type">const</span> <span class="type">int</span> &amp;num2)</span></span></span><br><span class="line"><span class="function">    </span>&#123;</span><br><span class="line">        <span class="type">int</span> sum = num1 + num2;</span><br><span class="line">        </span><br><span class="line">        <span class="keyword">return</span> sum;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="type">int</span> <span class="title">main</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">    <span class="type">int</span> num1 = <span class="number">1</span>;</span><br><span class="line">    <span class="type">int</span> num2 = <span class="number">2</span>;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">class</span> <span class="title class_">GetSum</span> get_sum;</span><br><span class="line">    <span class="type">int</span> sum = get_sum.<span class="built_in">calculation</span>(num1,num2);</span><br><span class="line"></span><br><span class="line">    cout &lt;&lt; sum &lt;&lt; endl;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<hr>
<h2 id="基于对象和面向对象编程范式的区别"><a href="#基于对象和面向对象编程范式的区别" class="headerlink" title="基于对象和面向对象编程范式的区别"></a>基于对象和面向对象编程范式的区别</h2><p>基于对象编程范式：</p>
<ul>
<li>具有“封装”特性</li>
<li>常用于中小项目</li>
</ul>
<p>面向对象编程范式：</p>
<ul>
<li>具有“封装”、“继承”和“多态”特性</li>
<li>使用虚函数、重写和设计模式等技术</li>
<li>常用于大项目</li>
</ul>
<hr>
<h1 id="常用STL容器"><a href="#常用STL容器" class="headerlink" title="常用STL容器"></a>常用STL容器</h1><p>顺序容器：</p>
<ul>
<li>数组&#x2F;向量</li>
<li>链表</li>
<li>队列</li>
<li>栈</li>
</ul>
<p>关联容器：</p>
<ul>
<li>图&#x2F;映射</li>
<li>集合</li>
<li>对组</li>
<li>元组</li>
</ul>
<hr>
<h2 id="数组-向量"><a href="#数组-向量" class="headerlink" title="数组&#x2F;向量"></a>数组&#x2F;向量</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>array</td>
<td>静态数组</td>
<td>C++11标准</td>
</tr>
<tr>
<td>vector</td>
<td>动态数组</td>
<td></td>
</tr>
</tbody></table>
<hr>
<h2 id="链表"><a href="#链表" class="headerlink" title="链表"></a>链表</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>list</td>
<td>双向链表</td>
<td></td>
</tr>
<tr>
<td>forward_list</td>
<td>单向链表</td>
<td>C++11标准</td>
</tr>
</tbody></table>
<hr>
<h2 id="队列"><a href="#队列" class="headerlink" title="队列"></a>队列</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>deque</td>
<td>管理数组+多个被管理数组</td>
<td></td>
</tr>
<tr>
<td>queue</td>
<td>deque</td>
<td>容器适配器</td>
</tr>
<tr>
<td>priority_queue</td>
<td>堆（完全二叉树）</td>
<td></td>
</tr>
</tbody></table>
<hr>
<h2 id="栈"><a href="#栈" class="headerlink" title="栈"></a>栈</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>stack</td>
<td>deque</td>
<td>容器适配器</td>
</tr>
</tbody></table>
<hr>
<h2 id="图-映射"><a href="#图-映射" class="headerlink" title="图&#x2F;映射"></a>图&#x2F;映射</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>map</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>multimap</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>unordered_map</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
<tr>
<td>unordered_multimap</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
</tbody></table>
<hr>
<h2 id="集合"><a href="#集合" class="headerlink" title="集合"></a>集合</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>set</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>multiset</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>unordered_set</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
<tr>
<td>unordered_multiset</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
</tbody></table>
<hr>
<h2 id="对组"><a href="#对组" class="headerlink" title="对组"></a>对组</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>pair</td>
<td>结构体struct</td>
<td></td>
</tr>
</tbody></table>
<hr>
<h2 id="元组"><a href="#元组" class="headerlink" title="元组"></a>元组</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>tuple</td>
<td>递归继承类</td>
<td>C++11标准</td>
</tr>
</tbody></table>
<hr>
<h2 id="总表"><a href="#总表" class="headerlink" title="总表"></a>总表</h2><table>
<thead>
<tr>
<th>名称</th>
<th>底层原理</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>array</td>
<td>静态数组</td>
<td>C++11标准</td>
</tr>
<tr>
<td>vector</td>
<td>动态数组</td>
<td></td>
</tr>
<tr>
<td>list</td>
<td>双向链表</td>
<td></td>
</tr>
<tr>
<td>forward_list</td>
<td>单向链表</td>
<td>C++11标准</td>
</tr>
<tr>
<td>deque</td>
<td>管理数组+多个被管理数组</td>
<td></td>
</tr>
<tr>
<td>queue</td>
<td>deque</td>
<td>容器适配器</td>
</tr>
<tr>
<td>priority_queue</td>
<td>堆（完全二叉树）</td>
<td></td>
</tr>
<tr>
<td>stack</td>
<td>deque</td>
<td>容器适配器</td>
</tr>
<tr>
<td>map</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>multimap</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>unordered_map</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
<tr>
<td>unordered_multimap</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
<tr>
<td>set</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>multiset</td>
<td>红黑树</td>
<td></td>
</tr>
<tr>
<td>unordered_set</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
<tr>
<td>unordered_multiset</td>
<td>哈希表</td>
<td>C++11标准</td>
</tr>
<tr>
<td>pair</td>
<td>结构体struct</td>
<td></td>
</tr>
<tr>
<td>tuple</td>
<td>递归继承类</td>
<td>C++11标准</td>
</tr>
</tbody></table>
<hr>
<h1 id="C-11标准"><a href="#C-11标准" class="headerlink" title="C++11标准"></a>C++11标准</h1><blockquote>
<p>依据《C++ Primer中文版（第5版）》XXV页的“C++11的新特性”栏所列顺序</p>
</blockquote>
<blockquote>
<p>可能常用的用粗体标示</p>
</blockquote>
<ul>
<li>long long 类型</li>
<li><strong>列表初始化</strong></li>
<li><strong>nullptr 常量</strong></li>
<li><strong>constexpr 变量</strong></li>
<li>类型别名声明</li>
<li><strong>auto 类型指示符</strong></li>
<li>decltype 类型指示符</li>
<li>类内初始化</li>
<li>使用 auto 或 decltype 缩写类型</li>
<li><strong>范围 for 语句</strong></li>
<li></li>
<li><strong>定义 vector 对象的 vector （向量的向量）</strong></li>
<li><strong>vector 对象的列表初始化</strong></li>
<li><strong>容器的 cbegin 和 cend 函数</strong></li>
<li>标准库函数 begin 和 end 函数</li>
<li>使用 auto 和 decltype 简化声明</li>
<li><strong>除法的舍入规则</strong></li>
<li><strong>用大括号包围的值列表赋值</strong> </li>
<li>将 sizeof 用于类成员</li>
<li><strong>范围 for 语句</strong> </li>
<li>标准库 initializer_list 类</li>
<li></li>
<li><strong>列表初始化返回值</strong></li>
<li>定义尾置返回类型</li>
<li>使用 decltype 简化返回类型定义</li>
<li>constexpr 函数</li>
<li><strong>使用&#x3D;default 生成默认构造函数</strong></li>
<li>类对象成员的类内初始化</li>
<li>委托构造函数</li>
<li>constexpr 构造函数</li>
<li><strong>用 string 对象处理文件名</strong></li>
<li><strong>array 和 forward_list 容器</strong></li>
<li></li>
<li><strong>容器的 cbegin 和 cend 函数</strong></li>
<li><strong>容器的列表初始化</strong></li>
<li><strong>容器的非成员函数 swap</strong></li>
<li><strong>容器 insert 成员的返回类型</strong></li>
<li>容器的 emplace 成员</li>
<li>shrink_to_fit</li>
<li><strong>string 的数值转换函数</strong></li>
<li><strong>lambda 表达式</strong></li>
<li><strong>lambda 表达式中的尾置返回类型</strong></li>
<li>标准库 bind 函数</li>
<li></li>
<li><strong>关联容器的列表初始化</strong></li>
<li><strong>列表初始化 pair 的返回类型</strong></li>
<li><strong>pair 的列表初始化</strong></li>
<li><strong>无序容器</strong></li>
<li><strong>智能指针</strong></li>
<li><strong>shared_ptr 类</strong></li>
<li><strong>动态分配对象的列表初始化</strong></li>
<li>auto 和动态分配</li>
<li><strong>unique_ptr 类</strong></li>
<li><strong>weak_ptr 类</strong></li>
<li></li>
<li><strong>范围 for 语句不能应用于动态分配数组</strong></li>
<li><strong>动态分配数组的列表初始化</strong></li>
<li>auto 不能用于分配数组</li>
<li>allocator::construct 可使用任意构造函数</li>
<li>将&#x3D;default 用于拷贝控制成员</li>
<li>使用&#x3D;delete 阻止拷贝类对象</li>
<li>用移动类对象代替拷贝类对象</li>
<li>右值引用</li>
<li>标准库 move 函数</li>
<li>移动构造函数和移动赋值</li>
<li></li>
<li>移动构造函数通常应该是noexcept</li>
<li>移动迭代器</li>
<li>引用限定成员函数</li>
<li>function 类模板</li>
<li><strong>explicit 类型转换运算符</strong></li>
<li>虚函数的 override 指示符</li>
<li>通过定义类为 final 来组阻止继承</li>
<li>虚函数的 override  和 final 指示符</li>
<li>删除的拷贝控制和继承</li>
<li>继承的构造函数</li>
<li></li>
<li>声明模板类型形参为友元</li>
<li>模板类型别名</li>
<li>模板函数的默认模板参数</li>
<li>实例化的显式控制</li>
<li>模板函数与尾置返回类型</li>
<li>引用折叠规则</li>
<li>用 static_cast 将左值转换为右值</li>
<li>标准库 forward 函数</li>
<li>可变参数模板</li>
<li>sizeof…运算符</li>
<li></li>
<li>可变参数模板与转发</li>
<li><strong>标准库 tuple 类模板</strong></li>
<li>新的 bitset 运算</li>
<li>正则表达式库</li>
<li>随机数库</li>
<li>浮点数格式控制</li>
<li>noexcept 异常指示符</li>
<li>noexcept 运算符</li>
<li>内联命名空间</li>
<li>继承的构造函数与多重继承</li>
<li></li>
<li>有作用域的 enum</li>
<li>说明类型用于保存 enum 对象</li>
<li>enum 的前置声明</li>
<li>标准库mem_fn 类模板</li>
<li>类类型的 union 成员</li>
</ul>
<hr>
<h2 id="大致分类"><a href="#大致分类" class="headerlink" title="大致分类"></a>大致分类</h2><p>改进：</p>
<ul>
<li>nullptr 常量</li>
<li>constexpr 变量</li>
<li>定义 vector 对象的 vector （向量的向量）</li>
</ul>
<p>语法糖：</p>
<ul>
<li>auto 类型推导</li>
<li>列表初始化</li>
<li>范围 for 语句</li>
<li>lambda 表达式</li>
</ul>
<p>智能指针：</p>
<ul>
<li>shared_ptr</li>
<li>unique_ptr</li>
<li>weak_ptr</li>
</ul>
<p>扩充容器：</p>
<ul>
<li>array</li>
<li>forward_list</li>
<li>unordered_map</li>
<li>unordered_multimap</li>
<li>unordered_set</li>
<li>unordered_multiset</li>
<li>tuple</li>
</ul>
<p>扩充库：</p>
<ul>
<li>bitset</li>
<li>正则表达式</li>
<li>随机数</li>
</ul>
<p>移动语义：</p>
<ul>
<li>&amp;&amp;右值引用</li>
<li>std::move()</li>
<li>移动构造函数和移动赋值运算符</li>
</ul>
<p>面向对象编程范式相关：</p>
<ul>
<li>explicit</li>
<li>&#x3D;default</li>
<li>&#x3D;delete</li>
<li>override</li>
<li>final</li>
</ul>
<p>面向泛型编程范式相关：</p>
<ul>
<li>模板函数的默认模板参数</li>
<li>可变参数模板</li>
</ul>
<hr>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>C++的基于对象编程范式、常用STL容器和C++11标准。</p>
<hr>
<h1 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h1><ul>
<li>《C++ Primer中文版（第5版）》作者：Stanley B.Lippman</li>
<li><a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/542115773">C++ STL 十六大容器 —— 底层原理与特性分析 - 知乎 (zhihu.com)</a></li>
<li><a target="_blank" rel="noopener" href="https://blog.csdn.net/lanzhihui_10086/article/details/41383017">C++标准库—pair用法及实现_lanzhihui_的博客-CSDN博客_pair底层实现</a></li>
<li><a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/356954012">走近std::tuple，揭秘C++元组的底层实现原理 - 知乎 (zhihu.com)</a></li>
<li><a target="_blank" rel="noopener" href="https://www.zhihu.com/question/65209863/answer/230185590">当面试官问我C++ 11新特性的时候，应该怎样回答？ - 知乎 (zhihu.com)</a></li>
</ul>
<hr>
<h1 id="作者的话"><a href="#作者的话" class="headerlink" title="作者的话"></a>作者的话</h1><ul>
<li><strong>感谢参考资料的作者&#x2F;博主</strong></li>
<li>作者：夜悊</li>
<li>版权所有，转载请注明出处，谢谢~</li>
<li><strong>如果文章对你有帮助，请点个赞或加个粉丝吧，你的支持就是作者的动力~</strong></li>
<li>文章在描述时有疑惑的地方，请留言，定会一一耐心讨论、解答</li>
<li>文章在认识上有错误的地方, 敬请批评指正</li>
<li>望读者们都能有所收获</li>
</ul>
<hr>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="http://example.com">夜悊</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="http://example.com/2022/12/23/C++%E7%9A%84%E5%9F%BA%E4%BA%8E%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B%E8%8C%83%E5%BC%8F%E3%80%81%E5%B8%B8%E7%94%A8STL%E5%AE%B9%E5%99%A8%E5%92%8CC++11%E6%A0%87%E5%87%86/">http://example.com/2022/12/23/C++的基于对象编程范式、常用STL容器和C++11标准/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://example.com" target="_blank">夜悊的技术小宅</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/C/">C++</a></div><div class="post_share"><div class="social-share" data-image="/img/cover20.png" data-sites="qq,wechat,weibo"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2022/12/06/Git%E7%9A%84%E7%B2%BE%E7%AE%80%E4%BD%BF%E7%94%A8/" title="Git的精简使用"><img class="cover" src= "" data-lazy-src="/img/cover1.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Git的精简使用</div></div></a></div><div class="next-post pull-right"><a href="/2023/01/02/%E3%80%8A%E6%95%B0%E6%8D%AE%E5%BA%93%E7%B3%BB%E7%BB%9F%E6%A6%82%E5%BF%B5%EF%BC%88%E7%AC%AC6%E7%89%88%EF%BC%89%E3%80%8B%E7%AC%AC1%E7%AB%A0%EF%BC%9A%E2%80%9C%E5%BC%95%E8%A8%80%E2%80%9D%E7%9A%84%E5%AD%A6%E4%B9%A0%E6%8F%90%E7%BA%B2/" title="《数据库系统概念（第6版）》第1章：“引言”的学习提纲"><img class="cover" src= "" data-lazy-src="/img/cover19.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">《数据库系统概念（第6版）》第1章：“引言”的学习提纲</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/2023/11/08/C%20%E5%92%8C%20C++%20%E5%8F%AF%E5%8F%98%E5%8F%82%E6%95%B0%E4%BB%8B%E7%BB%8D/" title="C 和 C++ 可变参数介绍"><img class="cover" src= "" data-lazy-src="/img/cover6.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-08</div><div class="title">C 和 C++ 可变参数介绍</div></div></a></div><div><a href="/2023/11/03/C++%20STL%20%E5%85%AD%E7%BB%84%E4%BB%B6%E4%BB%8B%E7%BB%8D/" title="C++ STL 六组件介绍"><img class="cover" src= "" data-lazy-src="/img/cover12.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-03</div><div class="title">C++ STL 六组件介绍</div></div></a></div><div><a href="/2023/10/01/C++%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E6%8E%92%E5%88%97%E6%95%B0%E7%AE%80%E5%8D%95%E7%94%9F%E6%88%90%E5%B7%A5%E5%85%B7/" title="C++代码示例：排列数简单生成工具"><img class="cover" src= "" data-lazy-src="/img/cover15.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-10-01</div><div class="title">C++代码示例：排列数简单生成工具</div></div></a></div><div><a href="/2023/11/05/C++%20%E4%BB%A3%E7%A0%81%E5%AE%9E%E4%BE%8B%EF%BC%9A%E5%A4%9A%E9%A1%B9%E5%BC%8F%E9%99%A4%E6%B3%95%E7%AE%80%E5%8D%95%E8%AE%A1%E7%AE%97%E5%B7%A5%E5%85%B7/" title="C++ 代码实例：多项式除法简单计算工具"><img class="cover" src= "" data-lazy-src="/img/cover17.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-05</div><div class="title">C++ 代码实例：多项式除法简单计算工具</div></div></a></div><div><a href="/2023/09/28/C++%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E7%BB%84%E5%90%88%E6%95%B0%E7%AE%80%E5%8D%95%E7%94%9F%E6%88%90%E5%B7%A5%E5%85%B7/" title="C++代码示例：组合数简单生成工具"><img class="cover" src= "" data-lazy-src="/img/cover6.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-09-28</div><div class="title">C++代码示例：组合数简单生成工具</div></div></a></div><div><a href="/2023/11/06/C++%20%E4%BB%A3%E7%A0%81%E5%AE%9E%E4%BE%8B%EF%BC%9A%E5%B9%B6%E6%9F%A5%E9%9B%86%E7%AE%80%E5%8D%95%E5%88%9B%E5%BB%BA%E5%B7%A5%E5%85%B7/" title="C++ 代码实例：并查集简单创建工具"><img class="cover" src= "" data-lazy-src="/img/cover15.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-06</div><div class="title">C++ 代码实例：并查集简单创建工具</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content is-expand"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%89%8D%E8%A8%80"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%9F%BA%E4%BA%8E%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B%E8%8C%83%E5%BC%8F"><span class="toc-number">2.</span> <span class="toc-text">基于对象编程范式</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%9D%A2%E5%90%91%E8%BF%87%E7%A8%8B%E7%BC%96%E7%A8%8B%E8%8C%83%E5%BC%8F%E7%9A%84%E4%BE%8B%E5%AD%90"><span class="toc-number">2.1.</span> <span class="toc-text">面向过程编程范式的例子</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9F%BA%E4%BA%8E%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B%E8%8C%83%E5%BC%8F%E7%9A%84%E4%BE%8B%E5%AD%90"><span class="toc-number">2.2.</span> <span class="toc-text">基于对象编程范式的例子</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9F%BA%E4%BA%8E%E5%AF%B9%E8%B1%A1%E5%92%8C%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B%E8%8C%83%E5%BC%8F%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">2.3.</span> <span class="toc-text">基于对象和面向对象编程范式的区别</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%B8%B8%E7%94%A8STL%E5%AE%B9%E5%99%A8"><span class="toc-number">3.</span> <span class="toc-text">常用STL容器</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%95%B0%E7%BB%84-%E5%90%91%E9%87%8F"><span class="toc-number">3.1.</span> <span class="toc-text">数组&#x2F;向量</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%93%BE%E8%A1%A8"><span class="toc-number">3.2.</span> <span class="toc-text">链表</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%98%9F%E5%88%97"><span class="toc-number">3.3.</span> <span class="toc-text">队列</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A0%88"><span class="toc-number">3.4.</span> <span class="toc-text">栈</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9B%BE-%E6%98%A0%E5%B0%84"><span class="toc-number">3.5.</span> <span class="toc-text">图&#x2F;映射</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%9B%86%E5%90%88"><span class="toc-number">3.6.</span> <span class="toc-text">集合</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AF%B9%E7%BB%84"><span class="toc-number">3.7.</span> <span class="toc-text">对组</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%85%83%E7%BB%84"><span class="toc-number">3.8.</span> <span class="toc-text">元组</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%80%BB%E8%A1%A8"><span class="toc-number">3.9.</span> <span class="toc-text">总表</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#C-11%E6%A0%87%E5%87%86"><span class="toc-number">4.</span> <span class="toc-text">C++11标准</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%A4%A7%E8%87%B4%E5%88%86%E7%B1%BB"><span class="toc-number">4.1.</span> <span class="toc-text">大致分类</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-number">5.</span> <span class="toc-text">总结</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99"><span class="toc-number">6.</span> <span class="toc-text">参考资料</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E4%BD%9C%E8%80%85%E7%9A%84%E8%AF%9D"><span class="toc-number">7.</span> <span class="toc-text">作者的话</span></a></li></ol></div></div></div></div></main><footer id="footer" style="background-image: url('/img/cover20.png')"><div id="footer-wrap"><div class="copyright">&copy;2023 - 2025 By 夜悊</div><div class="footer_custom_text"><a target="_blank" href="https://beian.miit.gov.cn/" >琼ICP备2023001225号-1</a><br><img src= "" data-lazy-src="/img/beian.png"/>&nbsp<a target="_blank" href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=46010802001221" >琼公网安备 46010802001221号</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js?v=4.13.0"></script><script src="/js/main.js?v=4.13.0"></script><script src="/js/tw_cn.js?v=4.13.0"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.8.8/dist/lazyload.iife.min.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js?v=4.13.0"></script></div></div></body></html>